home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
comm
/
tlx_sq21.zip
/
TAGLINE.SLT
< prev
next >
Wrap
Text File
|
1992-01-15
|
2KB
|
83 lines
//-----------------------------------------------------------
// TAGLINE.SLT Send tagline.
//
// Please look at the comments through the whole file, and modify to
// suit your needs, BEFORE you use it. Then recompile with CS TAGLINE.
//-----------------------------------------------------------
// If you have suggestions for improving this script, please suggest
// improvements to me via old-fashioned snail-mail to:
// Author: Inge Vabekk
// Hamangskogen 108
// N-1300 SANDVIKA
// NORWAY
// tel. (472) 546 396
str bbs_type[32] // BBS type.
,tagline [80] // Tagline.
,help [80] // Help line.
,bbstype []="BTYPE" // BBS type.
,version []="BBSver" // PCB version.
,tag [4] // Tagline.
,global []="GLOBAL" // Name of Global script.
;
//-----------------------------------------------------------
// Script starts here.
//-----------------------------------------------------------
main()
{
int BBSver;
BBSver = 0;
call (global,"R",bbstype,tagline); // Get BBS type.
if (tagline == "PCB" )
{ call (global,"R",version,tagline); // PCBoard:
BBSver = subchr (tagline,0); // Get version.
}
if (call (global,"R","TAGA",tagline) > 0) // Get tagline a.
{ if (BBSver > 144) prints (tagline);
wline (tagline);
}
call (global,"R","TAGX",help); // Get tagline X.
if (strlen(help) > 0) strcat (help," ");
// Different tagline for PCB and other systems.
if (BBSver) // PCB:
tag = "TAGC"; // Tagline C.
else
tag = "TAGB"; // No, tagline B.
call (global,"R",tag,tagline); // Get tagline b or c.
strcat (help,tagline); // Add to previous.
if (strposi (help,"!END",0) >=0) return; // Cut here?
if (BBSver > 144) prints (help);
wline (help);
}
//-----------------------------------------------------------
// Write line to COMx.
//-----------------------------------------------------------
wline(str line)
{
int l;
for (l=strlen(line)-1; l>=0; --l) // Strip trailing spaces.
{ if (subchr(line,l) > ' ') break;
setchr (line,l,0);
}
while ((l=strchr(line,0,255)) >=0) // Find 'FF' in line.
setchr(line,l,' '); // Replace with normal spaces.
cputs (line);
cputs ("^M");
}